import "package:http/http.dart" as http;

class HttpHelper {
  /// Get request
  static Future<http.Response> get(String url, {Map<String, String>? headers}) async {
    final response = await http.get(Uri.parse(url), headers: headers);
    return response;
  }

  /// Post request
  static Future<http.Response> post(String url, {Map<String, String>? headers, Object? body}) async {
    final response = await http.post(Uri.parse(url), headers: headers, body: body);
    return response;
  }

  /// Put request
  static Future<http.Response> put(String url, {Map<String, String>? headers, Object? body}) async {
    final response = await http.put(Uri.parse(url), headers: headers, body: body);
    return response;
  }

  /// Delete request
  static Future<http.Response> delete(String url, {Map<String, String>? headers, Object? body}) async {
    final response = await http.delete(Uri.parse(url), headers: headers, body: body);
    return response;
  }
}